﻿@model IEnumerable<AuditModel.CountyClassDate>

@{
    ViewBag.Title = AuditResources.UI.PageTitle;
    Layout = "~/Views/Shared/Admin/_EventSettingLayout.cshtml";
}

<h2><text>设置</text>@AuditResources.CountyClassDate.ObjectName</h2>

<h3 class="error">注意：管理员设定区县听课日期时会使用最后设定的日期更新所有已有参赛档案的听课日期。</h3>

<p>
    @Html.ActionLink(AuditResources.UI.Create, "Create", new { id = ViewBag.AnnualEventId }, new  { @class="button"})
</p>



@{
    var grid = new WebGrid(source: Model, defaultSort: "ClassDate", canPage:false);
}
@grid.GetHtml(
    columns: grid.Columns(
            grid.Column("County.Name", AuditResources.Archive.CountyCode),
            grid.Column("ClassDate", AuditResources.Archive.ClassDate, format:@<text>@string.Format("{0:d}", item.ClassDate)</text>),
            grid.Column("CountyCode", string.Empty, format: @<text>@Html.ActionLink(AuditResources.UI.Delete, "Delete", new { eventid = item.AnnualEventID, countycode = item.CountyCode, date = item.ClassDate }, new { @class = "button" })</text>)
        ))